jQuery(function(t) {
	var e = t(".nav .sea");
	t(".zoom_in a").on("toutchend click", function(t) {
		t.preventDefault();
		var n = e.filter(".selected");
		location.href = n.data("url")
	}), t(window).on("load", function() {
		var e = t(".amount_percent_bar").attr("data-amountPercent");
		t(".amount_percent_bar").css("width", e + "%").addClass("loaded")
	}),
	function(e, n) {
		function o(t) {
			return '<span class="' + t.stockStatus + '">' + t.stockText + "</span>"
		}
		if (!(e.length <= 0))
			if (0 >= n) t("select[name=product_item_id]").on("change", function() {
				var n = t(this.options[this.selectedIndex]);
				e.html(o(n.data()))
			});
			else {
				var a = function() {
					var n = 0,
						a = null;
					i.each(function() {
						var e, o;
						e = t("hidden" === this.type ? this : this.options[this.selectedIndex]), o = e.data("stock-time"), o && o > n && (n = o, a = e)
					}), a || (a = i.find("[data-stock-status=in_stock]:first-child")), e.html(o(a.data()))
				}, i = t('[name="product_item_id[]"]');
				i.filter("select").on("change", a), a()
			}
	}(t(".stock_info"), t('[name="item_quantity[]"]').length)
}), $(function() {
	$(function() {
		$("#btn_mypage_info_more > a").toggle(function(t) {
			t.preventDefault(), $("#mypage_more_info").fadeIn(), $("#btn_mypage_info_more_txt").text("close"), $("#btn_mypage_info_more_icon").removeClass("sprite_open_arrow_gray").addClass("sprite_close_arrow_gray")
		}, function(t) {
			t.preventDefault(), $("#mypage_more_info").slideUp("fast"), $("#btn_mypage_info_more_txt").text("more"), $("#btn_mypage_info_more_icon").removeClass("sprite_close_arrow_gray").addClass("sprite_open_arrow_gray")
		})
	})
}), $(function() {
	$("a.help_categoryLink").on("click", function(t) {
		t.preventDefault(), $(this).hasClass("_on") ? $(this).removeClass("_on").next(".help_list").slideUp() : $(this).addClass("_on").next(".help_list").slideDown()
	})
}),
function(t) {
	t.fn._lpModal = function(e) {
		var n = t.extend({
			contents: "_modalContents",
			close: "_modalClose"
		}, e),
			o = t(this),
			a = t("#wrapper"),
			i = function l(e) {
				e.preventDefault(), o.fadeOut(10), t(this).off("click", l), a.css("min-height", "")
			}, s = (o.css("position"), t(window).scrollTop() + 100);
		o.find("." + n.contents).css("top", s), o.find("." + n.close).each(function() {
			t(this).on("click", i)
		}), o.fadeIn(10)
	}
}(jQuery), $(function() {
	if ($("._amazonLogoutUrl").length) {
		var t = $("._amazonLogoutUrl").data("logouturl"),
			e = $("#Logout");
		e.on("click", function() {
			amazon.Login.logout(), document.cookie = "amazon_Login_accessToken=; expires=Thu, 01 Jan 1970 00:00:00 GMT", window.location = t
		})
	}
	if ($("#changeDeliveryDate").hasClass("_fcspMode")) {
		var n = $("#changeDeliveryDate"),
			o = n.find("._dateSelector").find("select[name=delivery_date]"),
			a = n.find("._timeZoneSelector").find("input[name=delivery_time]"),
			i = ["0812", "1214", "1416", "1618"],
			s = n.data("fastdate");
		$("select[name=delivery_date] option:selected").val() == s && a.each(function() {
			-1 != $.inArray($(this).val(), i) && $(this).attr("disabled", "disabled").closest(".orderDetail_infoList_input").css("display", "none")
		}), o.on("change", function() {
			var t = $(this).val();
			t == s ? (a.each(function() {
				-1 != $.inArray($(this).val(), i) && $(this).attr("disabled", "disabled").closest(".orderDetail_infoList_input").css("display", "none")
			}), -1 != $.inArray($(this).val(), i) && (console.log("// 選択している時間帯が選べない場合、「指定なし」に戻す"), $(this).val(""))) : a.each(function() {
				$(this).removeAttr("disabled").closest(".orderDetail_infoList_input").show()
			})
		})
	}
});